package com.xuanwu.ai.flow;

import com.xuanwu.ai.flow.component.persistence.CmpScan;
import com.xuanwu.ai.jdbc.annotation.EnableMultiDataSource;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = {"com.xuanwu.ai"})
@EnableFeignClients(basePackages = {"com.xuanwu.ai"})
@MapperScan(basePackages = {"com.xuanwu.ai"})
@CmpScan(basePackages = {"com.xuanwu.ai.flow.component"})
@EnableMultiDataSource
@Slf4j
public class AIFlowApplication {

    @Value("${ai.test}")
    private static String test;

    public static void main(String[] args) throws NoSuchMethodException {
        log.info("ai.test:{}", test);
        SpringApplication.run(AIFlowApplication.class, args);
    }

}
